package com.neusoft.neuiotms.dcom.model.change;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;
import com.neusoft.neuiotms.dcom.model.enums.ChangeConfirmationOperationEnum;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_change_confirmation")
@org.hibernate.annotations.Table(appliesTo = "neuiot_change_confirmation", comment = "变更确认表")
public class ChangeConfirmation extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '工作流TaskId'")
    private String taskId;

    @Length(max = 50, message = "工单号不能超过{max}位")
    @Column(length = 50, nullable = true)
    @Comment("varchar(50) NOT NULL COMMENT '工单号'")
    private String workOrderNum;

    @Enumerated(EnumType.STRING)
    @Column(length = 15, nullable = true)
    @Comment("varchar(15) NULL COMMENT '操作'")
    private ChangeConfirmationOperationEnum operation;

    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '备注'")
    private String remark;

}
